import 'package:flutter/material.dart';

class RichTextDemo extends StatelessWidget {
  const RichTextDemo({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('RichTextDemo'),
      ),
      body: Container(
        child: RichText(
          text: TextSpan(
            text: "登陆即视为同意",
            style: TextStyle(color: Color(0xAA333333), fontSize: 18),
            children: [
              TextSpan(
                text: "《巴乐兔服务协议》",
                style: TextStyle(
                  color: Color(0xAACE1928),
                ),
              ),
            ],
          ),
          textDirection: TextDirection.ltr,
        ),
      ),
    );
  }
}
